home *** CD-ROM | disk | FTP | other *** search
Wrap
ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE dmDVIAudioDecode - decode audio data compressed using the IMA (Interactive Multimedia Association) Recommended ADPCM decompression, based on Intel's DVI algorithm. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____aaaauuuuddddiiiioooouuuuttttiiiillll....hhhh>>>> DDDDMMMMssssttttaaaattttuuuussss ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooddddeeeeccccooooddddeeeerrrr hhhhaaaannnnddddlllleeee,,,, uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr ****iiiibbbbuuuuffff,,,, sssshhhhoooorrrrtttt ****oooobbbbuuuuffff,,,, iiiinnnntttt nnnnssssaaaammmmpppplllleeeessss)))) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR _h_a_n_d_l_e DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooddddeeeeccccooooddddeeeerrrr structure, created by a previous call to ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeeerrrrCCCCrrrreeeeaaaatttteeee((((3333ddddmmmm)))). It contains the state associated with the decoder. _i_b_u_f A pointer to the compressed input data buffer. The data format is unsigned char (8-bit). _o_b_u_f A pointer to the output sample data buffer. The data format is short (16-bit). The samples are assumed to be two's complement. Sampling rate may range from 8 kHz to 48 kHz, but has to be the same as encoder. _n_s_a_m_p_l_e_s The number of samples to be processed. For the 4:1 algorithm (the only one currently supported), the value of nsamples passed to the DVI encode/decode routines must always be a multiple of 2. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE Returns DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE or DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) implements Intel, Inc.'s DVI IMA4:1 ADPCM compression for monaural audio data. DVI IMA ADPCM compression exists in two forms, 4 bits per sample (IMA4:1) and 3 bits per sample (IMA3:1). The compression form may be retrieved using ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeeerrrrGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) via the parameter DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE. Its possible values are: DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____4444BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE 4:1 compression. This is the only form currently supported by the SGI Digital Media libraries. PPPPaaaaggggeeee 1111 ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____3333BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE 3:1 compression. Currently not supported. DDDDVVVVIIII AAAAUUUUDDDDIIIIOOOO FFFFIIIILLLLEEEE BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE DVI audio compression uses a linear prediction scheme. This means that the compressed bits are interrelated or interdependent. If a application seeks to an offset into the compressed bit stream file and then starts reading at that point in the stream and decompresses it via ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))), the interdependency of the bits at the start point is lost. The application will initially get back data with a lower amplitude than if he had read the same data back during a complete pass over the file from the beginning. In pure DVI ADPCM data, there is no way to accurately begin decoding data in the middle of the bit stream file without starting the beginning. Two solutions to this problem have been developed, one by Intel, Inc. and one by Apple, Inc. Both involve breaking the compressed data up into blocks, each with a small header encapsulating the information needed to allow decoding to begin at any block boundry with no loss of data. WWWWAAAAVVVVEEEE(4) and AAAAIIIIFFFFFFFF----CCCC(4) format sound files using IMA DVI compression take advantage of this block method, and if such a file is read using the Audio File Library, accurate file seeks are possible. The data contained in one of these files may also be decoded accurately using ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm) if it is configured properly. CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG DDDDMMMMAAAACCCC TTTTOOOO PPPPAAAARRRRSSSSEEEE IIIINNNN BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE Three parameters are needed to configure the DDDDMMMMaaaauuuuddddiiiiooooccccoooonnnnvvvveeeerrrrtttteeeerrrr to allow parsing of these block streams: DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____MMMMAAAAXXXX____BBBBYYYYTTTTEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK Indicates the number of bytes of compressed data per block, including the header. For AAAAIIIIFFFFFFFF----CCCC(4) files, this value is always 34 * channel_count. For WWWWAAAAVVVVEEEE(4) files, this value varies. If aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) is used to open a WWWWAAAAVVVVEEEE(4) file, the value of this parameter can be retrieved directly using aaaaffffGGGGeeeettttFFFFoooorrrrmmmmaaaattttPPPPaaaarrrraaaammmmssss(3dm). DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____FFFFRRRRAAAAMMMMEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK Indicates the number of frames of uncompressed data contained in each block. For AAAAIIIIFFFFFFFF----CCCC(4) files, this value is always 64. For WWWWAAAAVVVVEEEE(4) files, this value varies. If aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) is used to open a WWWWAAAAVVVVEEEE(4) file, the value of this parameter can be retrieved directly using aaaaffffGGGGeeeettttFFFFoooorrrrmmmmaaaattttPPPPaaaarrrraaaammmmssss(3dm). DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE This DVI-specific parameter specifies whether the data is compressed using the Intel scheme, the Apple scheme, or no blocking at all (i.e., "pure" DVI). Its possible values are: DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____NNNNOOOONNNNEEEE -- For stream use only. DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____AAAAPPPPPPPPLLLLEEEE -- For AIFF-C files. DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____IIIINNNNTTTTEEEELLLL -- For WAVE files. PPPPaaaaggggeeee 2222 ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))) IIIIMMMMPPPPOOOORRRRTTTTAAAANNNNTTTT NNNNOOOOTTTTEEEE Stereo audio streams and streams with block data _c_a_n_n_o_t be parsed using ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee(((()))) directly -- you must use ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm). It is highly recommended that the Audio File Library be used for all to- and from-disk compression and decompression. SSSSEEEEEEEE AAAALLLLSSSSOOOO dmDVIAudioDecoderCreate(3dm), dmDVIAudioDecoderSetParams(3dm), dmDVIAudioDecoderDestroy(3dm), dmDVIAudioEncode(3dm), afReadFrames(3dm), IMA Recommended Practices for Enhancing Digital Audio Compatibility in Multimedia Systems, rev 3.00. PPPPaaaaggggeeee 3333